package com.bjtu.restaurantreviews.dao;

import com.bjtu.restaurantreviews.domain.Advertisement;
import com.bjtu.restaurantreviews.domain.Restaurant;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface AdvertisementRepository extends JpaRepository<Advertisement,Integer> {
    @Query(value = "select * from advertisement limit 10",nativeQuery = true)
    @Modifying
    public List<Advertisement> advertisement();
}
